//
//  LHImagePickerManager.h
//  LHImagePicker
//
//  Created by 刘辉 lewis on 2018/6/13.
//  Copyright © 2018年 刘辉 lewis. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>

NS_ASSUME_NONNULL_BEGIN

@interface LHImagePickerManager : NSObject
/**
 根据指定的媒体类型获取对应的PHAsset数组
 
 @param ascending 是否升序排序
 @param sortKey   排序指定的key,更多key,请参考苹果官方文档https://developer.apple.com/documentation/photokit/phfetchoptions?preferredLanguage=occ
 @param type      媒体类型(视频，音频，图片)
 @return          结果数组
 */
+(NSMutableArray<PHAsset*>*)lh_getAssetInPhotoAblumWithAscending:(BOOL)ascending andSortDescriptorKey:(NSString*)sortKey andMediaType:(PHAssetMediaType)type;

/**
 根据PHAssetMediaType计算总个数
 
 @param type PHAssetMediaType
 @return     类型总数
 */
+(NSUInteger)lh_getAssetCountWithmediaType:(PHAssetMediaType)type;

+(void)lh_savePhotoAlbum:(UIImage*)image andCompletion:(void(^)(BOOL success,NSError*error))completion;
@end

NS_ASSUME_NONNULL_END
